<%-- 
    Document   : candidatureCompany
    Created on : 27 nov. 2014, 20:54:54
    Author     : metbill
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<fieldset><legend> Student's applications  </legend></fieldset>
<c:if test="${empty listCan}">
    <h3>No applications to review. </h3>
</c:if>
<c:if test="${not empty listCan}">   
    <c:forEach var="current" items="${listCan}" >
        <!--
        <TABLE>
        <TR>
        <TD>
            <h3>${current.student.lastName} ${current.student.firstName}</h3> 
            Mail: ${current.student.mail}<br/><br/>
            
            <h4>${current.intern.title}</h4>
            ${current.intern.description}
            <br/>
            <br/>
            Status: ${current.status}
           
        </TD>
        <TD>
            <form class="navbar-form navbar-left" role="Interview" method="get" action="/WebApp//writeNotif/${current.student.id}">
            <input type="hidden" name="applicationId" value="${current.applicationId}" />
            <input type="submit" value="Notification" class="btn btn-primary"  >
            </form>
            <br>
            <form class="navbar-form navbar-left" role="Accept" method="get" action="/WebApp/acceptSup">
                <input type="hidden" name="studentId" value="${current.student.id}" />
                <input type="hidden" name="applicationId" value="${current.applicationId}" />
            <input type="submit" value="Accept" class="btn btn-primary"  >            
            </form>
            <br>
            <form class="navbar-form navbar-left" role="Refuse" method="get" action="/WebApp/refuseSup">
            <input type="hidden" name="applicationId" value="${current.applicationId}" />
            <input type="submit" value="Refuse" class="btn btn-primary"  >            
            </form>
        </TD>
        </TR>    
        </TABLE>
        -->                
            <h3>Student: ${current.student.lastName} ${current.student.firstName}</h3>
            <div class="form-group">
                <div class="row">
                    <!-- CV/CL-->
                    <div class="col-lg-4">
                        <span> <b>Mail:</b> ${current.student.mail}</span>
                    </div>
                    <div class="col-lg-4">
                        <span> <b>Status: </b>${current.status}</span>
                    </div>
                </div>
                <br/>    
                <div class="row">
                    <div class="col-lg-4">
                        <span> <b>Title: </b>${current.intern.title}</span>
                    </div>
                </div>
                <br/>    
                <div class="row">
                    <span> <b>&nbsp;&nbsp;&nbsp Description: </b>${current.intern.description}</span>

                </div>
                    
                <br/>
                <!-- Accept/Refuse/Notifications-->                        
                <div class="row">
                    <div class="col-lg-4">     
                        <form class="navbar-form navbar-left" role="Interview" method="get" action="/WebApp//writeNotif/${current.student.id}">
                            <input type="hidden" name="applicationId" value="${current.applicationId}" />
                            <input type="submit" value="Notification" class="btn btn-primary"  >
                        </form>   
                    </div>      
                    <div class="col-lg-4">
                    <form class="navbar-form navbar-left" role="Accept" method="get" action="/WebApp/acceptSup"> 
                        <input type="hidden" name="studentId" value="${current.student.id}" /> 
                        <input type="hidden" name="companyName" value="${current.companyName}" />
                        <input type="hidden" name="comMail" value="${current.comMail}" /> 
                        <input type="hidden" name="comAddress" value="${current.comAddress}" />                 
                        <input type="hidden" name="applicationId" value="${current.applicationId}" />
                        <input type="submit" value="Accept" class="btn btn-success"  >            
                    </form>
                    </div>
                    <div class="col-lg-4">
                    <form class="navbar-form navbar-left" role="Refuse" method="get" action="/WebApp/refuseSup">
                        <input type="hidden" name="studentId" value="${current.student.id}" />
                        <input type="hidden" name="companyName" value="${current.companyName}" />
                        <input type="hidden" name="applicationId" value="${current.applicationId}" />
                        <input type="submit" value="Refuse" class="btn btn-danger"  >            
                    </form>
                    </div>                        
                </div>
                
            </div>
    </c:forEach>
</c:if>         